Hi Jack,
Moray is correct. A -1 indicates that that axis is not in use.
Thanks Moray. KFLOP can do 8 axes of coordinated motion, but KMotionCNC and Mach3 only support 6.
Regards TK
Group: DynoMotion |
Message: 10805 |
From: jojodillinger |
Date: 1/12/2015 |
Subject: Re: Steps To Get Running |
Hi all,
this is a very helpful thread for new users. Aside from the flash video in the dynomotion help of course:-)
However, I still have some things that are not clear to me.. I will do one by one, and as they come up, in this thread. Maybe thats the easiest:)
1) As I understand, the motor settings are downloaded to the KFlop with
KMotion and remain in there without having to run KMotion every time I
want to start working. At the same time, I can generate a
C-File from these motor settings (and call it
for example motor_settings_for_my_router.c). Is this file used anywhere then? I guess this is the init-file, referred to above, but in KMotionCNC I can nowhere define the location/name of an init-file. Maybe KMotionCNC just uses what it can find in the KFLOP instead?
2) When "saving/compiling/downloading" a C-Programm in KMotion, it means that its transferred to KFLOP, right? How can I then use it in KFLOP?
3) KMotionCNC itself has an option to define buttons that execute C-Programs. Is this the common way to, for example, automatically drive to the tool length sensor and measure? Or drive the axes to their home positions?
Thanks a lot! Kind regards,
Johannes
|
|
Group: DynoMotion |
Message: 10806 |
From: Moray Cuthill |
Date: 1/12/2015 |
Subject: Re: Steps To Get Running |
Hi Johannes, I'll try and fill in the details. 1) Everytime you power up the KFlop, you need to reload the settings (unless you flash them in, however that's not recommended for normal use, so best to ignore that feature!). This is done via the magical init.c file often mentioned. This file can be called whatever you want, however for simplicity everybody simply refers to their own file as init.c (plus it's easier to type!). In KMotionCNC, this is done via the INIT button. To select your own init file, go Tool Setup -> User Buttons tab, then for the INIT button (should be the top button in the tab), from the drop down menu select Execute Prog, at which point extra boxes appear allowing you to select the thread the file is to be loaded in (usually 0 for the init.c file), and for selecting your init.c file. 2) This is more for setup/testing purposes. When you click download, whatever file in the window you are working on is transferred to the relevant thread in KFlop. Once your file is working, you can then assign it to a button as per 1). 3) Yes. The more advanced option is to customise a screen to suit your needs. The other option is to assign C programmes to the relevant M/G-codes, then invoke them via MDI/G-Code without using screen buttons. Moray
|
|
Group: DynoMotion |
Message: 10807 |
From: Tom Kerekes |
Date: 1/12/2015 |
Subject: Re: Steps To Get Running |
Hi Johannes,
Regarding:
#1 - Not really. The settings will not remain in KFLOP after a power loss (unless they are Flashed which we do not recommend). After a power loss KFLOP must be reconfigured from scratch by either using KMotion.exe to download settings from the various screens, or by compiling/downloading/executing a C Program in KFLOP to set them. For final operation the C Program will always be used and KMotion.exe is no longer used or needed. The C program can do other things besides setting configuration parameters. It can enable axes, define the coordinate system, turn on relays, pumps, enable drives, whatever might be required for your particular system. The C program may also continue to run in a loop after everything is configured to watch, monitor, and service other things for your system such as external buttons, EStop conditions, MPGs, etc...
After you have created the C Program to do everything required for your system give it a unique name. Then from any application (Mach3, KMotionCNC, or your own custom application) all you need to do is run it to fully initialize your system.
For KMotionCNC configure a User Button to Execute it.
#2
"saving" = saving the C file to the PC's Hard disk
"compiling" = compiling the C file into binary machine code that KFLOP can execute and saving the binary code onto the PC's hard drive (*.out file type)
"downloading" = Transferring the machine code from the PC to one of KFLOP's Thread's memory spaces "execute" = Telling KFLOP to execute the code
#3
Correct. Most anything can be accomplished by running a C Program. So common things include: Initialization, Homing, Probing, Spindle Control, Tool Changes, etc...
HTH Regards TK
Group: DynoMotion |
Message: 10810 |
From: jojodillinger |
Date: 1/12/2015 |
Subject: Re: Steps To Get Running |
Hi Moray, Tom,
great, thanks for the clarification! All much clearer now. So KMotion in my case will be mainly used to generate settings for my motors, and for testing programs I write for doing jobs that will be required more often in normal operation (like tool change and measurement). In KMotionCNC I can assign a button to these and execute them. Aside from the "regular" GCode-loading and processing.
In the installation folder I saw a lot of C-Code, which probably then is meant as a starting point for own developments. Such as tool change. I will have a close look
As I understood (a question I forgot previsouly..), flashing should mainly be used for firmware related issues, not for saving own software on the KFLOP.
I guess at the moment this answers all my questions:)
Thanks again and kind regards,
Johannes
|
|
Group: DynoMotion |
Message: 10813 |
From: jojodillinger |
Date: 1/13/2015 |
Subject: Re: Steps To Get Running |
Hello, ok, after quite a bit more reading I have some new questions, one by one.. Sorry already if those appear silly..:)
1) I am a bit confused concerning velocity / acceleration (V / A) settings.. In KMotion.exe I define V and A in the "Step Response" screen.
a) According to the manual, I should I fill in here the maximum allowable/meaningful values for the motors, right?
b) What does the unit "position
units per second" for the velocity mean? Does this relate to the "Inv Dist Per Cycle"? If the latter variable is set to default 1.0, the a "position unit" is equal to a full step? Or is it a microstep?
c) In which kind of operation are these velocity and acceleration (defined in KMotion.exe) applied?
2) In KMotionCNC.exe, I can specify axis parameters: counts/inch, velocity and acceleration.
a) No matter whats defined in other windows, files.. this definitely is inch and not metric system, right? The manual is very clear about this, just wanted to be sure:)
b) I suppose "counts/inch" is fully related to my machine: here I have to define, how many counts are required for one inch translation. Dont I need the number of microsteps per step then? Somewhere I read, that KFLOP is fixed to 16 microsteps. In this case 1 count would be 1/16 of a step (in my case one step is 1.8 deg rotation of the stepper motor). Is this correct?
3) The velocity in inch/sec that I specify in KMotionCNC.exe, how does this compare to the velocity I specify in KMotion.exe (question 1)? Can you tell me which one is used where?
4) If counts/inch, velocities, acceleration from the trajectory planer are the ones that count: can they be implemented in the initialization C-File as well? Or is there another way of backing up those? In the end it would be really cool to have the initilization C-File, which fully defines the machine parameters. Currently, as I understand, the actual machine parameters (in trajectory planer) are not part of the C-File.
Again, sorry for this hughe list. I hope that most of them can be answered very short..:)
Kind regards,
Johannes
|
|
Group: DynoMotion |
Message: 10814 |
From: jojodillinger |
Date: 1/13/2015 |
Subject: Re: Steps To Get Running |
Group: DynoMotion |
Message: 10815 |
From: jojodillinger |
Date: 1/13/2015 |
Subject: Re: Steps To Get Running |
So the questions that are left are those:
1) In KMotion.exe I define V and A in the "Step Response" screen.
a) According to the manual, I should I fill in here the maximum allowable/meaningful values for the motors, right?
b) What
does the unit "position
units per second" for the velocity mean? Does this relate to the "Inv
Dist Per Cycle"? If the latter variable is set to default 1.0, the a
"position unit" is equal to a full step? Or is it a microstep?
2) If counts/inch,
velocities, acceleration from the trajectory planer are the ones that
count: can they be implemented in the initialization C-File as well? Or
is there another way of backing up those? In the end it would be really cool to have the initilization C-File, which fully defines the machine parameters. Currently, as I understand, the actual machine parameters (in trajectory planer) are not part of the C-File.
As usual, thanks a lot:) Kind regards,
Johannes
|
|
Group: DynoMotion |
Message: 10816 |
From: Moray Cuthill |
Date: 1/13/2015 |
Subject: Re: Steps To Get Running |
1) a) You set this as high as your system will allow, or as high as what's needed for the performance you desire. Off course you usually want to maintain to allow some safety margin in your settings. b) "position units per second" is exactly what it says, however it is highly dependant on your system. For an openloop stepper system it would be the number of steps/microsteps per second, for a servo system it would be the number of encoder pulses per second. "Inv Dist Per Cycle" IIRC relates to closed loop use, for if there is a ratio between the output steps/counts and the input steps/counts. i.e. you have a stepper that needs 800 pulses for one revolution, but has a 1000 count encoder. 2) All those settings get saved in KMotionCNC, as they are needed by the trajectory planner for planning motion. KMotionCNC essentially just sends the init.c (or any other C program) to the KFlop for the KFlop to process. KMotionCNC can't actually read anything from the file, so any setting that gets used within KMotionCNC has to be stored in a file that KMotionCNC can read. Moray
|
|
Group: DynoMotion |
Message: 10819 |
From: jojodillinger |
Date: 1/13/2015 |
Subject: Re: Steps To Get Running |
Thanks Moray,
regarding "position units per second", for my openloop stepper motor this is microsteps/second I suppose, where microstep is 1/16th of a step, where 1 step is 1.8deg revolution of the motor. Would that be correct?
Your answer to my KMotionCNC question makes total sense, sorry, messed it up (probably to tired:).. KMotionCNC does not do anything with the initialization or any other C-File, other than sending to KFLOP..
Regards,
Johannes
|
|
Group: DynoMotion |
Message: 10820 |
From: Moray Cuthill |
Date: 1/13/2015 |
Subject: Re: Steps To Get Running |
No problem. Correct about the steps. But just to ensure clarity and give an example, if you have a standard stepper (1.8deg/200steps per turn), then use 16x microsteps, it will take 3200 units (200x16) to turn one full revolution. If you then want a maximum speed of say 2 revolutions per second (120rpm), your position units per second setting would be 6400. I'm sure we're all guilty of missing the obvious. Moray
|
|
Group: DynoMotion |
Message: 10821 |
From: jojodillinger |
Date: 1/13/2015 |
Subject: Re: Steps To Get Running |
All clear now, thanks for the example! Johannes
|
|
Group: DynoMotion |
Message: 10824 |
From: jojodillinger |
Date: 1/14/2015 |
Subject: Re: Steps To Get Running |
Hello all,
ok, next rather basic topic on CNC wiring and KFLOP. First of all, I dont yet have access to the machine, only from end of january on.. but absolutely thrilled to learn as much as possible before.
The CNC will have one reference switch on each axis (x,y,z) and as I understood from the manual, should connect to JP33 IO 168, 169, ...
Here are my questions:
1) I dont yet really understand the ways how to tell KFLOP the moving
limits of my machine, and especially, how to make sure I dont damage the
mechanics by driving into the physical limitations.. Maybe you have a quick overview of how this is usually achieved in a simple 3-axis (+1 rotation) milling machine..
2) As I understand, homing does move the axis towards the reference switch until it hits it, measuring the switchs output. This should be done three times (once per axis). Referring to "SimpleHome3Axis.c", each axis is zeroed with the command "Zero(n)" where n is the axis-channel
a) this will now be my machine-zero-location, right? b) when only having one switch per axis, I somehow have to tell KFLOP that my x-axis can travel for example 800mm from this zero-location on. Can you tell me where this is done?
3) Can I use the reference switch at the same time also as a limit switch (by limit I mean a safety switch that prevents damage)?
4) I guess the limit settings are done in the "Configuration and Flash Screen" under "Limit Switch Options".
a) can I use the same IO bit (and thus the same switch) here that I use for homing?
b) If so, I guess I have to install three more reference switches at the opposite side of each existing switch..
Again, thanks a lot for your help, I really appreciate!!
Kind regards,
Johannes
|
|
Group: DynoMotion |
Message: 10833 |
From: Moray Cuthill |
Date: 1/14/2015 |
Subject: Re: Steps To Get Running |
1) Normally this is done at two levels. One being software, and one hardware. At a software level, you set soft limits so that the KFlop knows the limits of travel, however for the soft limits to be valid, the machine has to be homed/referenced first. At a hardware level, you have a set of limit switches, which when activated, ultimately remove power to motors. I say ultimately, as depending on the system there are several ways to acheive it, however the main thing is this is a hardware activation that does not rely on any form of software/processor to stop motion. 2) a) It can be whatever location you'd like it to be, as you can modify the c file to set the dros to any value you like, however leaving it as zero is perfectly acceptable aswell. It can set via the config and flash screen in KMotion, which you can then transfer into your init.c file along with the axis parameters, or you can set it in another C program such as your homing program, however I can't remember the exact command at the moment. b) See a). The value will be in counts, so you'll need to do a bit maths. 3) It can be done, however it's not advisable. I'm not sure what kind of machine you'll be using, but on larger machines it's best practise that limit switches are always active. Smaller low power machines, running into a mechanical stop usually isn't a problem, but on larger machines it can be quite painful. 4) It is possible to change settings on the fly, so you can quite easily change limit/home switch settings with some C code. Moray
|
|
Group: DynoMotion |
Message: 10834 |
From: jojodillinger |
Date: 1/14/2015 |
Subject: Re: Steps To Get Running |
Moray, thanks a lot, as usual! You say that the position when homing can be set in the Config and Flash screen. Do you have a hint..? Currently, the homing script says "Zero(n)" This sets the DRO to zero. I google "DRO" and found: Digital readout counter, hope thats correct.. Just to be sure: DRO is not only the number thats displayed in a GUI, this is the position information KFLOP uses to relate soft limits and everything else to, right? And DRO is measured in counts (like almost everything)? So if Im correct, I guess DRO corresponds to the machine coordinate system.. If instead of Zero I want to define the current DRO position to be 5000 counts (microsteps!), then from the manual I guess the command would be Pos0=5000.0 .. In this case, I might define softlimits to be 5000 and -200, which then have to correspond to my physical limits (or close at least), if Im correct.. Kind regards! Johannes PS the CNC I will use is small, something like 800x500x170mm travel, just to give you an idea.. ---In DynoMotion@yahoogroups.com, <moray.cuthill@...> wrote : 1) Normally this is done at two levels. One being software, and one hardware. At a software level, you set soft limits so that the KFlop knows the limits of travel, however for the soft limits to be valid, the machine has to be homed/referenced first. At a hardware level, you have a set of limit switches, which when activated, ultimately remove power to motors. I say ultimately, as depending on the system there are several ways to acheive it, however the main thing is this is a hardware activation that does not rely on any form of software/processor to stop motion. 2) a) It can be whatever location you'd like it to be, as you can modify the c file to set the dros to any value you like, however leaving it as zero is perfectly acceptable aswell. It can set via the config and flash screen in KMotion, which you can then transfer into your init.c file along with the axis parameters, or you can set it in another C program such as your homing program, however I can't remember the exact command at the moment. b) See a). The value will be in counts, so you'll need to do a bit maths. 3) It can be done, however it's not advisable. I'm not sure what kind of machine you'll be using, but on larger machines it's best practise that limit switches are always active. Smaller low power machines, running into a mechanical stop usually isn't a problem, but on larger machines it can be quite painful. 4) It is possible to change settings on the fly, so you can quite easily change limit/home switch settings with some C code. Moray
|
|
Group: DynoMotion |
Message: 10836 |
From: jojodillinger |
Date: 1/15/2015 |
Subject: Re: Steps To Get Running |
Hello,
I guess in my previous post I messed up some things. Apparently DRO is really just the readout on the screen?
Probably an explanation on coordinate systems would already clarify a lot.. Maybe you can help me with these questions:
How is the machine coordinate system defined and what are the commands to do so (are the "Zero" and the "Pos" command used for this?) ?
In which coordinate system are the softlimits defined?
When homing and using "Zero()", which coordainte-system is then "zeroed" (x=0, y=0, z=0, a=0) ?
Thanks a lot, I really appreciate..:) Kind regards,
Johannes
|
|
Group: DynoMotion |
Message: 10837 |
From: Moray Cuthill |
Date: 1/15/2015 |
Subject: Re: Steps To Get Running |
Johannes, DRO is simply Digital Read Out. When dealing with the KFlop, these are always in counts. All limits options are defined within the KFlop, either via your init.c file, or via another C file that is run when requested i.e. such as your homing program. These values will always be in counts, and can be very large very precise numbers. In KMotionCNC, the DROs displayed are in inches or mm. When in machine coordinates, they should be a direct conversion from the KFlop DROs, but you can apply various offsets to those basic readings, such as tool and work offsets, which can be applied using different methods. The Pos0=5000, is what you would use via the KMotion console, it won't work in a C program. In a C program you would have to use ch0->Position = 5000 While checking that, I noticed there is a basic sample file for using limit switches for homing - SimpleHomeLimits.c Moray
|
|
Group: DynoMotion |
Message: 10838 |
From: jojodillinger |
Date: 1/15/2015 |
Subject: Re: Steps To Get Running |
Thanks Moray, ok. I guess I get it now. So DRO really is just what displayed in the GUI. Maybe you can tell me if this here is correct..: When only considering KLFOP (not KMotionCNC with all its offsets and so on), there is basically just one (machine) coordinate system / position. The origin of the machine coordinate system is set to the current position of the axis with the command ch0->Position = 0 ch1->Position = 0 ch2->Position = 0 (which is equivalent to Zero(0), Zero(1), Zero(2) , right?) If this is correct up to here, now the important part:) The axis softlimits only make sense, when referring to a coordinate system. Is the above described coordinate system the one the softlimits refer to? So if I have soft limits of [-500 +10000] for ch0, from the above zero-position on my axis can move -500 or +10000 counts before hitting soft limit. (counts being equal to 1/16 of a full step, in my case of a STEP/DIR output). Thanks a lot.. Kind regards, Johannes ---In DynoMotion@yahoogroups.com, <moray.cuthill@...> wrote : Johannes, DRO is simply Digital Read Out. When dealing with the KFlop, these are always in counts. All limits options are defined within the KFlop, either via your init.c file, or via another C file that is run when requested i.e. such as your homing program. These values will always be in counts, and can be very large very precise numbers. In KMotionCNC, the DROs displayed are in inches or mm. When in machine coordinates, they should be a direct conversion from the KFlop DROs, but you can apply various offsets to those basic readings, such as tool and work offsets, which can be applied using different methods. The Pos0=5000, is what you would use via the KMotion console, it won't work in a C program. In a C program you would have to use ch0->Position = 5000 While checking that, I noticed there is a basic sample file for using limit switches for homing - SimpleHomeLimits.c Moray
|
|
Group: DynoMotion |
Message: 10840 |
From: Moray Cuthill |
Date: 1/15/2015 |
Subject: Re: Steps To Get Running |
That all sounds/looks correct to me. A minor thing that might be stating the obvious, is each line of C code should finish with a semi-colon. Moray
|
|
Group: DynoMotion |
Message: 10841 |
From: jojodillinger |
Date: 1/15/2015 |
Subject: Re: Steps To Get Running |
Thanks Moray! Will try to be quiet till I actually have the machine (to not so often ask obvious stuff).. Cant promise though, too tempting all this KLOP business:)
|
|
| | | |